home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group00a.txt / 000081_icon-group-sender _Thu Apr 27 12:31:53 2000.msg < prev    next >
Internet Message Format  |  2001-01-03  |  4KB

  1. Return-Path: <icon-group-sender>
  2. Received: (from root@localhost)
  3.     by baskerville.CS.Arizona.EDU (8.9.1a/8.9.1) id MAA24045
  4.     for icon-group-addresses; Thu, 27 Apr 2000 12:31:32 -0700 (MST)
  5. Message-Id: <200004271931.MAA24045@baskerville.CS.Arizona.EDU>
  6. From: "Frank J. Lhota" <NOSPAM.Frank.Lhota@lexma.meitech.com>
  7. X-Newsgroups: comp.lang.icon
  8. Subject: Re: Is Anyone Working On A Unicode Version Of Icon?
  9. X-Priority: 3
  10. X-MSMail-Priority: Normal
  11. X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
  12. X-Mimeole: Produced By Microsoft MimeOLE V5.00.2919.6600
  13. Date: Thu, 27 Apr 2000 12:35:56 -0000
  14. X-Trace: client 956853371 38.163.203.81 (Thu, 27 Apr 2000 12:36:11 EDT)
  15. To: icon-group@optima.CS.Arizona.EDU
  16. Errors-To: icon-group-errors@optima.CS.Arizona.EDU
  17. Status: RO
  18.  
  19.  
  20. "Gregg Townsend" <gmt@CS.Arizona.EDU> wrote in message
  21. news:8e75f6$5pr@baskerville.CS.Arizona.EDU...
  22. > A Unicode version of Jcon (the Java implementation of Icon) would not
  23. > be a huge task.  The hardest problem would be deciding language issues,
  24. > notably the definitions of the predefined csets.
  25.  
  26. Actually, even for the eight bit version of Icon, the definitions of
  27. &letters, &lcase, and &ucase deserve a second look. For international use,
  28.  
  29.     char( 16rE0 to 16rFE )
  30.  
  31. often represent lower case letters (such as "a" with an umlaut), and
  32.  
  33.     char( 16rC0 to 16rDE )
  34.  
  35. often represent upper case letters, but none of these characters do not show
  36. up in &letter, &lcase or &ucase. These predefined csets restrict their
  37. attention exclusively to the &ascii characters.
  38.  
  39. Granted, this is due to the strange evolution of 8 bit character coding.
  40. Standards for how to interpret characters with the high bit on were slow to
  41. evolve. Some ASCII platforms had quite novel interpretations of these
  42. characters. MS-DOS machines, for example, had the OEM character set, which
  43. used most of the upper half of &cset for math symbols and symbols useful for
  44. drawing boxes. Amidst this anarchy, it would be foolhardy for Icon to
  45. include any characters outside of &ascii in &letters, &lcase, or &ucase.
  46.  
  47. We may, unfortunately, be at a point where this is too late to change the
  48. predefined csets. There are probably Icon programs out there that depend on
  49. *&letters = 52, *&lcase = *&ucase = 26, &letters ++ &ascii === &ascii, etc.,
  50. and hence changing the csets would cause them to break. The right fix might
  51. be to add new prefined csets, so that new code could be properly
  52. internationalized.
  53.  
  54. > You'd also want a
  55. > different internal representation for csets.
  56.  
  57. Currently, a cset is basically stored as a packed array of 256 bits (one bit
  58. for each 8-bit character). For 32 bit platforms, this requires just 8 words.
  59. If we were to use the packed array of bits approach for wide characters, a
  60. cset would be represented by 2048 words -- Yikes! Clearly, we would need to
  61. use a different internal representation.
  62.  
  63. I would suggest representing a cset as an ordered list  of character
  64. intervals. For example, the cset of characters that can be used in an Icon
  65. identifier would be represented as this sequence of intervals:
  66.  
  67.     [ "0" to "9", "A" to "Z", "_" to "_", "a" to "z" ]
  68.  
  69. I will grant that, in the worst case, this representation method can take up
  70. a lot of storage. A cset of all wide characters c with the lowest order bit
  71. on would require 32,768 intervals. Most csets that actually occur in
  72. applications, however, could be represented by a handful of intervals.
  73.  
  74. I must confess that I am just starting to learn Java, so it will be awhile
  75. before I can try this on my own :(
  76.  
  77.  
  78.